package com.metal.gear.certification.entity.dto.position;

import com.metal.gear.certification.entity.po.SysPosition;
import com.metal.gear.common.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.beans.BeanUtils;

@Data
@Schema(name ="职务保存或者编辑实体")
public class SysPositionSaveAndEditDto {

    @Schema(name = "职务id")
    private String id;

    @Schema(name ="职务编码")
    private String code;

    @Schema(name = "职务名称")
    private String name;

    @Schema(name = "职级")
    @Dict(dicCode = "position_rank")
    private String postRank;

    public static SysPosition translateTo(SysPositionSaveAndEditDto dto){
        SysPosition po = new SysPosition();
        BeanUtils.copyProperties(dto,po);
        return po;
    }


}
